package test.sunyu.tools.hbase;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import sunyu.tools.hbase.HbaseTools;

public class Task implements Runnable {

    private static final Logger logger = LoggerFactory.getLogger(Thread.currentThread().getClass());

    private HbaseTools hbaseTools;
    private long i;
    private String locationTime;

    public Task(HbaseTools hbaseTools,
                String locationTime,
                long i) {
        this.hbaseTools = hbaseTools;
        this.i = i;
        this.locationTime = locationTime;
    }

    @Override
    public void run() {
        logger.info(Thread.currentThread().getName() + "正在处理：" + i);
        hbaseTools.put("tab", "did_00000000001_" + locationTime, "fn", "can", locationTime);
    }

}
